package com.dhcc.DRGsHosp.facade.impl;

import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Stack;

import javax.inject.Named;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.transport.http.HTTPConduit;
import org.openkoala.koala.commons.InvokeResult;
import org.openkoala.koalacommons.resourceloader.util.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

import com.dhcc.DRGsHosp.application.DrgsIndexCalApplication;
import com.dhcc.DRGsHosp.application.MedicalRecordApplication;
import com.dhcc.DRGsHosp.application.OrderApplication;
import com.dhcc.DRGsHosp.application.SystemConfigApplication;
import com.dhcc.DRGsHosp.core.domain.Order;
import com.dhcc.DRGsHosp.facade.DrgsIndexCalFacade;
import com.dhcc.DRGsHosp.facade.OrderFacade;
import com.dhcc.DRGsHosp.facade.dto.OrderDTO;
import com.dhcc.DRGsHosp.facade.impl.assembler.OrderAssembler;
import com.dhcc.DRGsHosp.infra.util.Arith;
import com.dhcc.DRGsHosp.infra.util.ConstantEnum;
import com.dhcc.DRGsHosp.infra.util.DrgsIndex;
import com.dhcc.DRGsHosp.infra.util.GlobalData;

/**
 * @title		:OrderFacadeImpl.java
 * @description	:
 * @author		:lileizheng
 * @date		:2015年11月12日
 * @version     :1.0
 * @copyright   :DHCC 2013-2014 
 */
@Named("drgsHospFacadeImpl35")
public class OrderFacadeImpl implements OrderFacade {
	SimpleDateFormat  dateFormater= new SimpleDateFormat("yyyy-MM-dd");//对日期格式进行转换
	@Autowired 
	private OrderApplication orderApplication;
	
	
	@Autowired
	private MedicalRecordApplication medicalRecordApplication;
	
	@Autowired 
	private SystemConfigApplication systemConfigApplication;
	
	@Autowired
	private DrgsIndexCalApplication  drgsIndexCalApplication;
	
	@Autowired
	private DrgsIndexCalFacade drgsIndexCalFacade;
	
	@Override
	public InvokeResult getOrderQuotaValue(OrderDTO order){
		String dateFrom=DrgsIndex.formateDateFrom(order.getDateFrom());
		String dateTo=DrgsIndex.formateDateTo(order.getDateTo());
		order.setDateFrom(dateFrom);
		order.setDateTo(dateTo);
		List<Map<String, Object>> resultList = new LinkedList<>();
		Map<String, Object> resultMap = new HashMap<>();
		//获取超标数据
		order.setIsExceeding("1");
		Map<String,Object> result1 = orderApplication.getOrderQuotaValue1(OrderAssembler.toEntity(order));
		//获取未超标数据
		order.setIsExceeding("0");
		Map<String,Object> result3 = orderApplication.getOrderQuotaValue1(OrderAssembler.toEntity(order));
		//获取全部数据
		order.setIsExceeding(null);
		Map<String,Object> result5 = orderApplication.getOrderQuotaValue1(OrderAssembler.toEntity(order));
		
		//病例数1，所有指标按顺序排好
		resultMap.put("value-all", result5.get("TOTALCASECNT")!=null?result5.get("TOTALCASECNT").toString():0);
		resultMap.put("value-000", result3.get("TOTALCASECNT")!=null?result3.get("TOTALCASECNT").toString():0);
		resultMap.put("value-001", result1.get("TOTALCASECNT")!=null?result1.get("TOTALCASECNT").toString():0);
		resultMap.put("i", 1);
		resultMap.put("ddesc", "病例数");
		resultList.add(resultMap);
		
		//次均费用2
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("AVGFEE")!=null?result5.get("AVGFEE").toString():0);
		resultMap.put("value-000", result3.get("AVGFEE")!=null?result3.get("AVGFEE").toString():0);
		resultMap.put("value-001", result1.get("AVGFEE")!=null?result1.get("AVGFEE").toString():0);
		resultMap.put("i", 2);
		resultMap.put("ddesc", "次均费用(万元)");
		resultList.add(resultMap);
		
		//总费用3
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("TOTALFEE")!=null?result5.get("TOTALFEE").toString():0);
		resultMap.put("value-000", result3.get("TOTALFEE")!=null?result3.get("TOTALFEE").toString():0);
		resultMap.put("value-001", result1.get("TOTALFEE")!=null?result1.get("TOTALFEE").toString():0);
		resultMap.put("i", 3);
		resultMap.put("ddesc", "总费用(万元)");
		resultList.add(resultMap);
		
		//医疗费用4
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("MEDFEE")!=null?result5.get("MEDFEE").toString():0);
		resultMap.put("value-000", result3.get("MEDFEE")!=null?result3.get("MEDFEE").toString():0);
		resultMap.put("value-001", result1.get("MEDFEE")!=null?result1.get("MEDFEE").toString():0);
		resultMap.put("i", 4);
		resultMap.put("ddesc", "医疗费用(万元)");
		resultList.add(resultMap);
		
		//医技费用5
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("TECHFEE")!=null?result5.get("TECHFEE").toString():0);
		resultMap.put("value-000", result3.get("TECHFEE")!=null?result3.get("TECHFEE").toString():0);
		resultMap.put("value-001", result1.get("TECHFEE")!=null?result1.get("TECHFEE").toString():0);
		resultMap.put("i", 5);
		resultMap.put("ddesc", "医技费用(万元)");
		resultList.add(resultMap);
		
		//护理费用6
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("NURSFEE")!=null?result5.get("NURSFEE").toString():0);
		resultMap.put("value-000", result3.get("NURSFEE")!=null?result3.get("NURSFEE").toString():0);
		resultMap.put("value-001", result1.get("NURSFEE")!=null?result1.get("NURSFEE").toString():0);
		resultMap.put("i", 6);
		resultMap.put("ddesc", "护理费用(万元)");
		resultList.add(resultMap);
		
		//药品费用7
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("DRUGFEE")!=null?result5.get("DRUGFEE").toString():0);
		resultMap.put("value-000", result3.get("DRUGFEE")!=null?result3.get("DRUGFEE").toString():0);
		resultMap.put("value-001", result1.get("DRUGFEE")!=null?result1.get("DRUGFEE").toString():0);
		resultMap.put("i", 7);
		resultMap.put("ddesc", "药品费用(万元)");
		resultList.add(resultMap);
		
		//管理费用8
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("MANAGFEE")!=null?result5.get("MANAGFEE").toString():0);
		resultMap.put("value-000", result3.get("MANAGFEE")!=null?result3.get("MANAGFEE").toString():0);
		resultMap.put("value-001", result1.get("MANAGFEE")!=null?result1.get("MANAGFEE").toString():0);
		resultMap.put("i", 8);
		resultMap.put("ddesc", "管理费用(万元)");
		resultList.add(resultMap);
		
		//医嘱项数9
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("ORDERCOUNT")!=null?result5.get("ORDERCOUNT").toString():0);
		resultMap.put("value-000", result3.get("ORDERCOUNT")!=null?result3.get("ORDERCOUNT").toString():0);
		resultMap.put("value-001", result1.get("ORDERCOUNT")!=null?result1.get("ORDERCOUNT").toString():0);
		resultMap.put("i", 9);
		resultMap.put("ddesc", "医嘱项数");
		resultList.add(resultMap);
		
		//医嘱总金额10
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("ORDERTOTALFEE")!=null?result5.get("ORDERTOTALFEE").toString():0);
		resultMap.put("value-000", result3.get("ORDERTOTALFEE")!=null?result3.get("ORDERTOTALFEE").toString():0);
		resultMap.put("value-001", result1.get("ORDERTOTALFEE")!=null?result1.get("ORDERTOTALFEE").toString():0);
		resultMap.put("i", 10);
		resultMap.put("ddesc", "医嘱总金额(万元)");
		resultList.add(resultMap);
		
		//次均医嘱金额11
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("ORDERAVGFEE")!=null?result5.get("ORDERAVGFEE").toString():0);
		resultMap.put("value-000", result3.get("ORDERAVGFEE")!=null?result3.get("ORDERAVGFEE").toString():0);
		resultMap.put("value-001", result1.get("ORDERAVGFEE")!=null?result1.get("ORDERAVGFEE").toString():0);
		resultMap.put("i", 11);
		resultMap.put("ddesc", "次均医嘱金额(万元)");
		resultList.add(resultMap);
		
		//平均医嘱次数12
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("ORDERSAVG")!=null?result5.get("ORDERSAVG").toString():0);
		resultMap.put("value-000", result3.get("ORDERSAVG")!=null?result3.get("ORDERSAVG").toString():0);
		resultMap.put("value-001", result1.get("ORDERSAVG")!=null?result1.get("ORDERSAVG").toString():0);
		resultMap.put("i", 12);
		resultMap.put("ddesc", "平均医嘱次数");
		resultList.add(resultMap);
		
		//转科人数13
		resultMap = new HashMap<>();
		resultMap.put("value-all", result5.get("TRANSDEPS")!=null?result5.get("TRANSDEPS").toString():0);
		resultMap.put("value-000", result3.get("TRANSDEPS")!=null?result3.get("TRANSDEPS").toString():0);
		resultMap.put("value-001", result1.get("TRANSDEPS")!=null?result1.get("TRANSDEPS").toString():0);
		resultMap.put("i", 13);
		resultMap.put("ddesc", "转科人数");
		resultList.add(resultMap);
		return InvokeResult.success(resultList);
	}
	
	public InvokeResult getOrderAnalysisResult(OrderDTO order){
		String dateFrom=DrgsIndex.formateDateFrom(order.getDateFrom());
		String dateTo=DrgsIndex.formateDateTo(order.getDateTo());
		order.setDateFrom(dateFrom);
		order.setDateTo(dateTo);
		List<Map<String, Object>> resultList = orderApplication.getOrderAnalysisResult(OrderAssembler.toEntity(order));
		return InvokeResult.success(resultList);
	}

	@Override
	public InvokeResult getResultDetail(OrderDTO order) {
		String dateFrom=DrgsIndex.formateDateFrom(order.getDateFrom());
		String dateTo=DrgsIndex.formateDateTo(order.getDateTo());
		order.setDateFrom(dateFrom);
		order.setDateTo(dateTo);
		List<Map<String, Object>> list = new LinkedList<>();
		order.setIsExceeding("1");
		List<Map<String, Object>> resultList = orderApplication.getOrderAnalysisResult(OrderAssembler.toEntity(order));
		if(resultList.size()>0){
			Map<String, Object> objs = resultList.get(0);
			objs.put("i", 1);
			objs.put("ddesc", "超标病例");
			list.add(objs);
		}
		order.setIsExceeding("0");
		resultList = orderApplication.getOrderAnalysisResult(OrderAssembler.toEntity(order));
		if(resultList.size()>0){
			Map<String, Object> objs = resultList.get(0);
			objs.put("i", 2);
			objs.put("ddesc", "未超标病例");
			list.add(objs);
		}else{
			Map<String, Object> map = new HashMap<>();
			map.put("i", 2);
			map.put("ddesc", "未超标病例");
			map.put("ORDERID", "-");
			map.put("ORDERDESC", "-");
			map.put("MAXUNITPRICE", "-");
			map.put("MRCOUNT", "-");
			map.put("ORDERTOTALFEE", "-");
			map.put("ORDERAVGFEE", "-");
			map.put("ORDERQUALITY", "-");
			map.put("ORDERCOUNT", "-");
			map.put("USAGERATE", "-");
			map.put("NOTEXCELLENT", "-");
			list.add(map);
		}
		order.setIsExceeding("all");
		resultList = orderApplication.getOrderAnalysisResult(OrderAssembler.toEntity(order));
		if(resultList.size()>0){
			Map<String, Object> objs = resultList.get(0);
			objs.put("i", 3);
			objs.put("ddesc", "全部病例");
			list.add(objs);
		}
		return InvokeResult.success(list);
	}
	
	public InvokeResult getOrderAnalysisResultTotal(OrderDTO order){
		String dateFrom=DrgsIndex.formateDateFrom(order.getDateFrom());
		String dateTo=DrgsIndex.formateDateTo(order.getDateTo());
		order.setDateFrom(dateFrom);
		order.setDateTo(dateTo);
		List<Map<String, Object>> resultList = orderApplication.getOrderAnalysisResultTotal(OrderAssembler.toEntity(order));
		Map<String, Object> objs = new HashMap<>();
		if(resultList.size()>0){
			objs = resultList.get(0);
		}
		List<Map<String, Object>> resultFeeList = orderApplication.getOrderAnalysisResultTotalFee(OrderAssembler.toEntity(order));
		if(resultFeeList.size()>0){
			objs.put("TOTALFEE", resultFeeList.get(0)==null?"0":resultFeeList.get(0).get("TOTALFEE"));
		}
		try{
			if(objs.get("TOTALFEE")!=null && objs.get("ORDERTOTALFEE")!=null){
				double orderFeeRatio = Arith.round((Double.parseDouble(objs.get("ORDERTOTALFEE").toString())/Double.parseDouble(objs.get("TOTALFEE").toString()))*100,2);
				objs.put("ORDERFEERATIO", orderFeeRatio);
			}
		}catch(Exception e){
			objs.put("ORDERFEERATIO", 0);
		}
		return InvokeResult.success(objs);
	}

	@Override
	public InvokeResult getADRGBy(OrderDTO order) {
		String groupScheme=drgsIndexCalFacade.getGroupScheme();
		List<Map<String, Object>> resultList = orderApplication.getADRGBy(OrderAssembler.toEntity(order),groupScheme);
		return InvokeResult.success(resultList);
	}

	@Override
	public InvokeResult getDRGsBy(OrderDTO order) {
		String groupScheme=drgsIndexCalFacade.getGroupScheme();
		List<Map<String, Object>> resultList = orderApplication.getDRGsBy(OrderAssembler.toEntity(order),groupScheme);
		return InvokeResult.success(resultList);
	}

	@Override
	public InvokeResult getCases(OrderDTO order) {
		String dateFrom=DrgsIndex.formateDateFrom(order.getDateFrom());
		String dateTo=DrgsIndex.formateDateTo(order.getDateTo());
		order.setDateFrom(dateFrom);
		order.setDateTo(dateTo);
		List<Map<String, Object>> medicalRecords = orderApplication.findMedicalRecord(OrderAssembler.toEntity(order));
		return InvokeResult.success(medicalRecords);
	}
	
	List<Order> orderList = null;
	/**
	 * 
	 *  @Description：按时间段查询
	 *  @Author LiuHongJun  
	 *  @see com.dhcc.DRGsHosp.facade.OrderFacade#orderImport(com.dhcc.DRGsHosp.facade.dto.OrderDTO)
	 */
	@Override
	public InvokeResult orderImport(OrderDTO order){
		int totalSize = 0;
		int successSize = 0;
		int errorSize = 0;
		int orderCount = 0;
		List<String> errorList = new LinkedList<>();
		List<String> noneList = new LinkedList<>();
		//获取webServices路径
		String dayMonitor = GlobalData.sysConfig.get("IMPORT_ORDER");
		String wsUrl = "";//医嘱明细地址
		String method = "";//医嘱明细方法
		if(dayMonitor!=null && dayMonitor.split("θ").length>1){
			wsUrl = dayMonitor.split("θ")[0];
			method = dayMonitor.split("θ")[1];
		}		
		BufferedWriter bout = null;
		try{
			String dateFrom = order.getDateFrom();
			String dateTo = order.getDateTo();
			dateFrom = DrgsIndex.formateDateFrom(dateFrom) ;
			dateTo = DrgsIndex.formateDateTo(dateTo) ;
			String stdId=drgsIndexCalFacade.getStdID(dateFrom, dateTo);
			List<Map<String, Object>> medList = medicalRecordApplication.findMedicalRecordBy(dateFrom, dateTo);
			
			Map<String,String> orderFeeType=orderApplication.getOrderFeeType();//存储医嘱费用分类与费用五大类的对应关系
			
			JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
			Client client = clientFactory.createClient(wsUrl);
			HTTPConduit http = (HTTPConduit) client.getConduit();
			http.getClient().setConnectionTimeout(6000000);// 连接超时(毫秒)
			http.getClient().setAllowChunking(false);// 取消块编码
			http.getClient().setReceiveTimeout(6000000);// 响应超时(毫秒)
			totalSize = medList.size();
			successSize = 0;
			errorSize = 0;
			orderCount = 0;
			bout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("C:/order.txt"),"utf-8"));
			for(Map<String, Object> record: medList){
//				Map<String, Object> record=null;
				String recordId =/*"9578974";/*/record.get("MRNO").toString();
				String pmainIndex=/*"9578974";/*/record.get("PMAININDEX").toString();
				//查询要查询医嘱明细表相关的病例信息
				String groupScheme=drgsIndexCalFacade.getGroupScheme();
				Map<String,Object> caseInfoMap=orderApplication.getCaseInfo(pmainIndex,stdId,groupScheme);
				orderList = new LinkedList<Order>();
				try {
					bout.write("-------------------------------------------------------------------------");
			        bout.newLine();
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始导入病人"+recordId+"...");
			        bout.newLine();
			        Object[] response = null;
			        try{
			        	response = client.invoke(method, recordId);
			        }catch(Exception e){
			        	throw new TimeOutException("接口异常");
			        }
					
					String resultXml = "";//buildStr();
					if(response!=null&&response.length>0){
						resultXml = (String) response[0];
					}
					if("-1".equals(resultXml)){
						bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 不存在该病人信息");
				        bout.newLine();
					}
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始解析"+recordId+"xml...");
			        bout.newLine();
					xmlParse(resultXml);
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 解析完毕"+recordId+"医嘱数量:"+orderList.size());
			        bout.newLine();
			        bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始保存病人医嘱...");
			        bout.newLine();
			        
					if(orderList.size()>0){
						orderCount += orderList.size();
						try {
							orderApplication.saveOrder(orderList,caseInfoMap,orderFeeType);
							orderApplication.updateMedicalrecord(pmainIndex, orderList.get(0).getOrderMrId());
							bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存成功！");
					        bout.newLine();
					        successSize++;
						} catch (Exception e) {
							bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存失败："+e.toString());
					        bout.newLine();
					        errorSize++;
							errorList.add(recordId);
						}
					}else{
						noneList.add(recordId);
					}
				} catch (Exception e) {
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 解析失败..");
			        bout.newLine();
			        bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 原因:"+e.toString());
			        bout.newLine();
			        bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 重新连接...");
			        bout.newLine();
			        client = clientFactory.createClient(wsUrl);
					http = (HTTPConduit) client.getConduit();
					http.getClient().setConnectionTimeout(6000000);// 连接超时(毫秒)
					http.getClient().setAllowChunking(false);// 取消块编码
					http.getClient().setReceiveTimeout(6000000);// 响应超时(毫秒)
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 重新导入该病人");
			        bout.newLine();
			        try{
			        		Object[] response = client.invoke(method, recordId);
					        String resultXml = buildStr();
							if(response.length>0){
								resultXml = (String) response[0];
							}
							if("-1".equals(resultXml)){
								bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 不存在该病人信息");
						        bout.newLine();
							}
							bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始解析"+recordId+"xml...");
					        bout.newLine();
							xmlParse(resultXml);
							bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 解析完毕"+recordId+"医嘱数量:"+orderList.size());
					        bout.newLine();
					        bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始保存病人医嘱...");
					        bout.newLine();
							if(orderList.size()>0){
								orderCount += orderList.size();
								try {
									orderApplication.updateMedicalrecord(pmainIndex, orderList.get(0).getOrderMrId());
									orderApplication.saveOrder(orderList,caseInfoMap,orderFeeType);
									bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存成功2！");
							        bout.newLine();
									successSize++;
								} catch (Exception e1) {
									bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存失败2："+e1.getMessage());
							        bout.newLine();
							        errorSize++;
									errorList.add(recordId);
								}
							}else{
								noneList.add(recordId);
							}
			        }catch(Exception e1){
			        	bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 再次导入失败！"+e1.getMessage());
				        bout.newLine();
				        errorSize++;
						errorList.add(recordId);
			        }
				}
			}
		}catch(Exception e){
			try {
				bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 报错信息:"+e.toString());
				bout.newLine();
			} catch (IOException e1) {
				e1.printStackTrace();
			}
		}finally{
			try {
				//保存医嘱后，更新医嘱开单科室表
//				orderApplication.saveOrderDep();
				
				String logTxt = "成功导入:"+successSize+"个 \n 失败:"+errorSize+"个 \n 总计:"+totalSize+"个 \n";
				bout.write(logTxt);
		        bout.newLine(); 
				logTxt = "医嘱总数量:"+orderCount+" \n ";
				bout.write(logTxt);
		        bout.newLine(); 
				logTxt = "报错详情:\n";
				bout.write(logTxt);
		        bout.newLine(); 
				for(String errors: errorList){
					logTxt = errors+", \n";
					bout.write(logTxt);
			        bout.newLine(); 
				}
				logTxt = "缺乏医嘱:\n";
				bout.write(logTxt);
		        bout.newLine(); 
				for(String none: noneList){
					logTxt = none+", \n";
					bout.write(logTxt);
			        bout.newLine(); 
				}
				bout.flush();
				bout.close();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return InvokeResult.success();
	}
	
	@Override
	public InvokeResult orderImportByRecordId(String recordId){
		String dayMonitor = GlobalData.sysConfig.get("IMPORT_ORDER");
		String wsUrl = "";//医嘱明细地址
		String method = "";//医嘱明细方法
		if(dayMonitor!=null && dayMonitor.split("θ").length>1){
			wsUrl = dayMonitor.split("θ")[0];
			method = dayMonitor.split("θ")[1];
		}
		BufferedWriter bout = null;
		Map<String,String> orderFeeType=orderApplication.getOrderFeeType();//存储医嘱费用分类与费用五大类的对应关系
		JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
		Client client = clientFactory.createClient(wsUrl);
		HTTPConduit http = (HTTPConduit) client.getConduit();
		http.getClient().setConnectionTimeout(6000000);// 连接超时(毫秒)
		http.getClient().setAllowChunking(false);// 取消块编码
		http.getClient().setReceiveTimeout(6000000);// 响应超时(毫秒)
		try {
			bout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("C:/order.txt"),"utf-8"));
			//通过病案号与入院日期查询PMAININDEX
			String pmainIndex="";
			String stdId="";
			if(recordId.split("\\^").length>=2){
				Map<String,Object> casePmainIndexMap=orderApplication.getCaseByMrNoIndate(recordId.split("\\^")[0], recordId.split("\\^")[1]);
				pmainIndex=casePmainIndexMap.get("PMAININDEX")==null?"":casePmainIndexMap.get("PMAININDEX").toString();
				stdId=drgsIndexCalFacade.getStdID(recordId.split("\\^")[1], recordId.split("\\^")[1]);
			}
			//查询要查询医嘱明细表相关的病例信息
			String groupScheme=drgsIndexCalFacade.getGroupScheme();
			Map<String,Object> caseInfoMap=orderApplication.getCaseInfo(pmainIndex,stdId,groupScheme);
			orderList = new LinkedList<Order>();
			try {
				bout.write("-------------------------------------------------------------------------");
			    bout.newLine();
				bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始导入病人"+pmainIndex+"...");
			    bout.newLine();
			    Object[] response = null;
			    try{
			    	response = client.invoke(method, recordId);
			    }catch(Exception e){
			    	throw new TimeOutException("接口异常");
			    }
				
				String resultXml = "";
//			    String resultXml=buildStr();
				if(response.length>0){
					resultXml = (String) response[0];
				}
				if("-1".equals(resultXml)){
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 不存在该病人信息");
			        bout.newLine();
				}
				bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始解析"+recordId+"xml...");
			    bout.newLine();
				xmlParse(resultXml);
				bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 解析完毕"+recordId+"医嘱数量:"+orderList.size());
			    bout.newLine();
			    bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始保存病人医嘱...");
			    bout.newLine();
				if(orderList.size()>0){
					try {
						orderApplication.saveOrder(orderList,caseInfoMap,orderFeeType);
						orderApplication.updateMedicalrecord(pmainIndex, orderList.get(0).getOrderMrId());
						bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存成功！");
					    bout.newLine();
					} catch (Exception e) {
						bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存失败："+e.toString());
				        bout.newLine();
					}
				}else{
					bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 该病人没有医嘱");
			        bout.newLine();
				}
			} catch (Exception e) {
				bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 解析失败..");
			    bout.newLine();
			    bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 原因:"+e.toString());
			    bout.newLine();
			    bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 重新连接...");
			    bout.newLine();
			    client = clientFactory.createClient(wsUrl);
				http = (HTTPConduit) client.getConduit();
				http.getClient().setConnectionTimeout(6000000);// 连接超时(毫秒)
				http.getClient().setAllowChunking(false);// 取消块编码
				http.getClient().setReceiveTimeout(6000000);// 响应超时(毫秒)
				bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 重新导入该病人");
			    bout.newLine();
			    try{
			    		Object[] response = client.invoke(method, recordId);
				        String resultXml = "";
//			    		String resultXml=buildStr();
						if(response.length>0){
							resultXml = (String) response[0];
						}
						if("-1".equals(resultXml)){
							bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 不存在该病人信息");
					        bout.newLine();
						}
						bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始解析"+recordId+"xml...");
				        bout.newLine();
						xmlParse(resultXml);
						bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 解析完毕"+recordId+"医嘱数量:"+orderList.size());
				        bout.newLine();
				        bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 开始保存病人医嘱...");
				        bout.newLine();
						if(orderList.size()>0){
							try {
								orderApplication.saveOrder(orderList,caseInfoMap,orderFeeType);
								orderApplication.updateMedicalrecord(pmainIndex, orderList.get(0).getOrderMrId());
								bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存成功2！");
						        bout.newLine();
							} catch (Exception e1) {
								bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 保存失败2："+e1.getMessage());
						        bout.newLine();
							}
						}else{
							bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 该病人没有医嘱");
					        bout.newLine();
						}
			    }catch(Exception e1){
			    	bout.write("at "+new SimpleDateFormat("yyyy-mm-dd HH:MM:ss").format(new Date())+" 再次导入失败！"+e1.getMessage());
			        bout.newLine();
			    }
			}
			//保存医嘱后，更新医嘱开单科室表
//			orderApplication.saveOrderDep();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				bout.flush();
				bout.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return InvokeResult.success();
	}

	/**
	 * @methodname    :xmlParse
	 * @description   :SAX解析xml主过程
	 * @param         :
	 * @author        :lileizheng
	 * @return        :null
	 * @date          :2016年1月14日
	 */
	private void xmlParse(String xmlString) throws Exception{
		// step 1: 获得SAX解析器工厂实例
        SAXParserFactory factory = SAXParserFactory.newInstance();
        // step 2: 获得SAX解析器实例
        SAXParser parser = factory.newSAXParser();
        // step 3: 开始进行解析
        StringReader read = new StringReader(xmlString);  
        InputSource source = new InputSource(read);  
        parser.parse(source, new MyHandler());
	}
	
  private static String buildStr(){
		StringBuilder sql = new StringBuilder();
		sql.append(" <Response> \n ");
		sql.append(" <AdmDR>3036707</AdmDR> \n ");
		sql.append(" <PaperName>张宝</PaperName> \n ");
		sql.append(" <DepDesc>XNK21-心内科21</DepDesc> \n ");
		sql.append(" <AdmDocName>迟云鹏</AdmDocName> \n ");
		sql.append(" <InDate>2015-11-27</InDate> \n ");
		sql.append(" <OutDate>2015-12-01</OutDate> \n ");
		sql.append(" <AdmOrdInfoes> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400030001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>普通病房床位费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140003</SubcatCode> \n ");
		sql.append(" <SubcatDesc>床位费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>24</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>24</OrdFee> \n ");
		sql.append(" <Oeoridr>19816953||1</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-27</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>190</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>床位费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000040149</ArcimCode> \n ");
		sql.append(" <ArcimDesc>流式尿沉渣检查+尿十项</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>临检</SubcatDesc> \n ");
		sql.append(" <UnitPrice>26</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>26</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKMZ-检验科门诊</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||10</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000010012</ArcimCode> \n ");
		sql.append(" <ArcimDesc>粪便常规+潜血</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>临检</SubcatDesc> \n ");
		sql.append(" <UnitPrice>17.5</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>17.5</OrdFee> \n ");
		sql.append(" <RecDepDesc>MZHYS-门诊化验室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||11</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000020027</ArcimCode> \n ");
		sql.append(" <ArcimDesc>糖化血红蛋白</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100002</SubcatCode> \n ");
		sql.append(" <SubcatDesc>血液</SubcatDesc> \n ");
		sql.append(" <UnitPrice>70</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>70</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKXYS-检验科血液室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||12</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000020018</ArcimCode> \n ");
		sql.append(" <ArcimDesc>凝血五项</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100002</SubcatCode> \n ");
		sql.append(" <SubcatDesc>血液</SubcatDesc> \n ");
		sql.append(" <UnitPrice>205</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>205</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKXYS-检验科血液室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||13</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>100010001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>心内科护理常规</ArcimDesc> \n ");
		sql.append(" <SubcatCode>010001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>护理常规</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||14</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>100060004</ArcimCode> \n ");
		sql.append(" <ArcimDesc>二级护理</ArcimDesc> \n ");
		sql.append(" <SubcatCode>010006</SubcatCode> \n ");
		sql.append(" <SubcatDesc>护理级别</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>7</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||15</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>90</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>200010010</ArcimCode> \n ");
		sql.append(" <ArcimDesc>低盐低脂糖尿病饮食</ArcimDesc> \n ");
		sql.append(" <SubcatCode>020001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>饮食</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||16</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400010009</ArcimCode> \n ");
		sql.append(" <ArcimDesc>三级医院住院诊疗费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>诊疗费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>7</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||18</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>10</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>诊察(诊疗)费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400040001</ArcimCode> \n ");
		sql.append(" <ArcimDesc> 病房取暖费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140004</SubcatCode> \n ");
		sql.append(" <SubcatDesc>取暖费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>9</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>9</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||19</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400030001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>普通病房床位费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140003</SubcatCode> \n ");
		sql.append(" <SubcatDesc>床位费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>24</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>24</OrdFee> \n ");
		sql.append(" <Oeoridr>19816953||2</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-28</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>190</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>床位费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500040001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>静脉抽血</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050019</SubcatCode> \n ");
		sql.append(" <SubcatDesc>注射</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||20</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>80</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030342</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血针头(BD 21G绿)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.38</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.38</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||21</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500250001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>床旁心电图(病房自做12导以下)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050043</SubcatCode> \n ");
		sql.append(" <SubcatDesc>自做心电图</SubcatDesc> \n ");
		sql.append(" <UnitPrice>12</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>12</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||22</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>20</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>一般检查费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1105130037</ArcimCode> \n ");
		sql.append(" <ArcimDesc>超声心动图(彩色,超声科)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>110513</SubcatCode> \n ");
		sql.append(" <SubcatDesc>超声心动图</SubcatDesc> \n ");
		sql.append(" <UnitPrice>245</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>245</OrdFee> \n ");
		sql.append(" <RecDepDesc>CSXDS-病房超声心动室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||23</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>110</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>超声费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030332</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血器空管(BD 2.7ml蓝)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.71</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.71</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||24</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030332</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血器空管(BD 2.7ml蓝)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.71</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.71</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||25</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030329</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血器空管(BD 2ml紫)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.64</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.64</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||26</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030329</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血器空管(BD 2ml紫)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.64</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.64</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||27</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030332</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血器空管(BD 2.7ml蓝)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.71</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.71</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||28</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001010720</ArcimCode> \n ");
		sql.append(" <ArcimDesc>真空采血器空管(2.5ml_5ml 奥地利)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.68</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.68</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||29</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500410002</ArcimCode> \n ");
		sql.append(" <ArcimDesc>干化学血糖快速定量(科室测)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050041</SubcatCode> \n ");
		sql.append(" <SubcatDesc>科室检验</SubcatDesc> \n ");
		sql.append(" <UnitPrice>8</UnitPrice> \n ");
		sql.append(" <Quantity>2</Quantity> \n ");
		sql.append(" <OrdFee>16</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>何东方</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||3</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-29</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000170061</ArcimCode> \n ");
		sql.append(" <ArcimDesc>甲功五项测定(T.L.A)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100017</SubcatCode> \n ");
		sql.append(" <SubcatDesc>TLA</SubcatDesc> \n ");
		sql.append(" <UnitPrice>185</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>185</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKJZ-检验科急诊</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||30</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000090049</ArcimCode> \n ");
		sql.append(" <ArcimDesc>免疫V1(急)★★</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100017</SubcatCode> \n ");
		sql.append(" <SubcatDesc>TLA</SubcatDesc> \n ");
		sql.append(" <UnitPrice>480</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>480</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKLJS-检验科临检室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||31</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212191</ArcimCode> \n ");
		sql.append(" <ArcimDesc>倍他乐克片(25mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.4</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>.4</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||32</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302206025</ArcimCode> \n ");
		sql.append(" <ArcimDesc>拜唐苹片(50mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>2.38</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>7.14</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||33</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302211092</ArcimCode> \n ");
		sql.append(" <ArcimDesc>*泮立苏肠溶胶囊(40mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>5.9</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>5.9</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||34</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212239</ArcimCode> \n ");
		sql.append(" <ArcimDesc>*美百乐镇片(40mg*7)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>9.98</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>9.98</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||35</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212124</ArcimCode> \n ");
		sql.append(" <ArcimDesc>波立维片(75mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>18.96</UnitPrice> \n ");
		sql.append(" <Quantity>4</Quantity> \n ");
		sql.append(" <OrdFee>75.84</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||36</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302202070</ArcimCode> \n ");
		sql.append(" <ArcimDesc>阿司匹林肠溶片(拜阿0.1g)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.5</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>.5</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||38</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212124</ArcimCode> \n ");
		sql.append(" <ArcimDesc>波立维片(75mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>18.96</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>18.96</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||39</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400030001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>普通病房床位费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140003</SubcatCode> \n ");
		sql.append(" <SubcatDesc>床位费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>24</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>24</OrdFee> \n ");
		sql.append(" <Oeoridr>19816953||4</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-29</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>190</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>床位费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>900010031</ArcimCode> \n ");
		sql.append(" <ArcimDesc>介入检查</ArcimDesc> \n ");
		sql.append(" <SubcatCode>110000</SubcatCode> \n ");
		sql.append(" <SubcatDesc>透视</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>dgsjc-导管室检查</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||40</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>301115013</ArcimCode> \n ");
		sql.append(" <ArcimDesc>氯化钠注射液 0.9% (塑料安瓿_0.9% 10ml)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0301</SubcatCode> \n ");
		sql.append(" <SubcatDesc>针剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.59</UnitPrice> \n ");
		sql.append(" <Quantity>2</Quantity> \n ");
		sql.append(" <OrdFee>3.18</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||41</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500010003</ArcimCode> \n ");
		sql.append(" <ArcimDesc>小换药</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>换药</SubcatDesc> \n ");
		sql.append(" <UnitPrice>3</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>9</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||42</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>43</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>一般治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001030346</ArcimCode> \n ");
		sql.append(" <ArcimDesc>静脉留置针(贝朗安全型 套管针 14G_24G)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>19.21</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>19.21</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||43</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500040007</ArcimCode> \n ");
		sql.append(" <ArcimDesc>留置针穿刺</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050019</SubcatCode> \n ");
		sql.append(" <SubcatDesc>注射</SubcatDesc> \n ");
		sql.append(" <UnitPrice>8</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>8</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||44</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>80</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500080001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>备皮</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050008</SubcatCode> \n ");
		sql.append(" <SubcatDesc>备皮</SubcatDesc> \n ");
		sql.append(" <UnitPrice>5</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>5</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||45</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>80</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>200010024</ArcimCode> \n ");
		sql.append(" <ArcimDesc>禁食水</ArcimDesc> \n ");
		sql.append(" <SubcatCode>020001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>饮食</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||46</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400100001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>术前准备</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140010</SubcatCode> \n ");
		sql.append(" <SubcatDesc>术前准备</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||47</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150002080408</ArcimCode> \n ");
		sql.append(" <ArcimDesc>敷料(53*70 优韧宁)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150002</SubcatCode> \n ");
		sql.append(" <SubcatDesc>卫生材料</SubcatDesc> \n ");
		sql.append(" <UnitPrice>2.62</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>2.62</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>陶倩</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||48</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150002080115</ArcimCode> \n ");
		sql.append(" <ArcimDesc>敷料费(无菌纱布块 2片装7.5*7.5 绍兴)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150002</SubcatCode> \n ");
		sql.append(" <SubcatDesc>卫生材料</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.99</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>.99</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>陶倩</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||49</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000170249</ArcimCode> \n ");
		sql.append(" <ArcimDesc>心肌标志物1(TLA)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100017</SubcatCode> \n ");
		sql.append(" <SubcatDesc>TLA</SubcatDesc> \n ");
		sql.append(" <UnitPrice>200</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>200</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKTLA-检验科TLA</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||5</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150004140614</ArcimCode> \n ");
		sql.append(" <ArcimDesc>一次性弯盘(限换药用 北京)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150004</SubcatCode> \n ");
		sql.append(" <SubcatDesc>低值器械</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.8</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1.8</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>陶倩</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||50</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150003130005</ArcimCode> \n ");
		sql.append(" <ArcimDesc>注射器(10ml 溶药 洁瑞山东威高)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150003</SubcatCode> \n ");
		sql.append(" <SubcatDesc>玻璃器皿</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.64</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>.64</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>陶倩</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||51</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150001020517</ArcimCode> \n ");
		sql.append(" <ArcimDesc>可来福接头(Cl_2000型,C3300)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>医疗用品</SubcatDesc> \n ");
		sql.append(" <UnitPrice>57.42</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>57.42</OrdFee> \n ");
		sql.append(" <RecDepDesc>21-二十一病房</RecDepDesc> \n ");
		sql.append(" <ResDocName>陶倩</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||52</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>900010001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>冠状动脉造影(择期)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>090001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>冠脉介入</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1000</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>1000</OrdFee> \n ");
		sql.append(" <RecDepDesc>dgsjc-导管室检查</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||53</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>32</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>500200002</ArcimCode> \n ");
		sql.append(" <ArcimDesc>静脉输液</ArcimDesc> \n ");
		sql.append(" <SubcatCode>050019</SubcatCode> \n ");
		sql.append(" <SubcatDesc>注射</SubcatDesc> \n ");
		sql.append(" <UnitPrice>2</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>2</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||54</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>80</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>900090021</ArcimCode> \n ");
		sql.append(" <ArcimDesc>心导管工作站(进口机)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>090010</SubcatCode> \n ");
		sql.append(" <SubcatDesc>介入检查费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>400</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>400</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||55</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>32</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>900090018</ArcimCode> \n ");
		sql.append(" <ArcimDesc>使用监视器加收(介入)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>090010</SubcatCode> \n ");
		sql.append(" <SubcatDesc>介入检查费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>30</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>30</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||56</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>32</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>900090022</ArcimCode> \n ");
		sql.append(" <ArcimDesc>心导管透视</ArcimDesc> \n ");
		sql.append(" <SubcatCode>090010</SubcatCode> \n ");
		sql.append(" <SubcatDesc>介入检查费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>100</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>100</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||57</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>32</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入治疗费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150011100612</ArcimCode> \n ");
		sql.append(" <ArcimDesc>三圈注射器(北京 迪玛克)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150017</SubcatCode> \n ");
		sql.append(" <SubcatDesc>高值其他</SubcatDesc> \n ");
		sql.append(" <UnitPrice>108.9</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>108.9</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||58</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>162</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150011100613</ArcimCode> \n ");
		sql.append(" <ArcimDesc>三连三通(北京迪玛克)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150017</SubcatCode> \n ");
		sql.append(" <SubcatDesc>高值其他</SubcatDesc> \n ");
		sql.append(" <UnitPrice>99</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>99</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||59</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>162</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000170192</ArcimCode> \n ");
		sql.append(" <ArcimDesc>生化I(TLA)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100017</SubcatCode> \n ");
		sql.append(" <SubcatDesc>TLA</SubcatDesc> \n ");
		sql.append(" <UnitPrice>388</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>388</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKTLA-检验科TLA</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||6</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150003131003</ArcimCode> \n ");
		sql.append(" <ArcimDesc>输液器(双头06APD_7 哈娜好 双路瓶针)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150003</SubcatCode> \n ");
		sql.append(" <SubcatDesc>玻璃器皿</SubcatDesc> \n ");
		sql.append(" <UnitPrice>2.31</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>6.93</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||60</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>161</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>治疗用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150015100120</ArcimCode> \n ");
		sql.append(" <ArcimDesc>超滑导丝(直头180/260cm ASAHIINTECC日本)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150015</SubcatCode> \n ");
		sql.append(" <SubcatDesc>导丝</SubcatDesc> \n ");
		sql.append(" <UnitPrice>363</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>363</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||61</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>162</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150011100154</ArcimCode> \n ");
		sql.append(" <ArcimDesc>造影导管(日本泰尔茂210)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150011</SubcatCode> \n ");
		sql.append(" <SubcatDesc>高值管</SubcatDesc> \n ");
		sql.append(" <UnitPrice>231</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>231</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||62</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>162</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150012100237</ArcimCode> \n ");
		sql.append(" <ArcimDesc>桡动脉鞘(日本 泰尔茂)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150012</SubcatCode> \n ");
		sql.append(" <SubcatDesc>高值鞘</SubcatDesc> \n ");
		sql.append(" <UnitPrice>226.6</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>226.6</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||63</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>162</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150016100898</ArcimCode> \n ");
		sql.append(" <ArcimDesc>压力传感器(PX260/PX240 美国爱德华)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150011</SubcatCode> \n ");
		sql.append(" <SubcatDesc>高值管</SubcatDesc> \n ");
		sql.append(" <UnitPrice>334.4</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>334.4</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||64</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>180</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>检查用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>301103039</ArcimCode> \n ");
		sql.append(" <ArcimDesc>利多卡因注射液(益民 0.2g)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0301</SubcatCode> \n ");
		sql.append(" <SubcatDesc>针剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.42</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>.42</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||65</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>301114010</ArcimCode> \n ");
		sql.append(" <ArcimDesc>肝素钠注射液(12500u)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0301</SubcatCode> \n ");
		sql.append(" <SubcatDesc>针剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>11.68</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>11.68</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||66</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>301112009</ArcimCode> \n ");
		sql.append(" <ArcimDesc>硝酸甘油注射液(5mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0301</SubcatCode> \n ");
		sql.append(" <SubcatDesc>针剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>1.42</UnitPrice> \n ");
		sql.append(" <Quantity>2</Quantity> \n ");
		sql.append(" <OrdFee>2.84</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||67</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>301120013</ArcimCode> \n ");
		sql.append(" <ArcimDesc>氯化钠注射液 0.9%易拉双鹤 (0.9% 500ml)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>030112</SubcatCode> \n ");
		sql.append(" <SubcatDesc>针剂输液</SubcatDesc> \n ");
		sql.append(" <UnitPrice>4.38</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>13.14</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||68</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>301120091</ArcimCode> \n ");
		sql.append(" <ArcimDesc>0.9%氯化钠注射液100ML(双鹤双口管)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>030112</SubcatCode> \n ");
		sql.append(" <SubcatDesc>针剂输液</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7.76</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>23.28</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||69</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000020062</ArcimCode> \n ");
		sql.append(" <ArcimDesc>血小板聚集试验(AA)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100002</SubcatCode> \n ");
		sql.append(" <SubcatDesc>血液</SubcatDesc> \n ");
		sql.append(" <UnitPrice>30</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>30</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKXYS-检验科血液室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||7</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>150012100259</ArcimCode> \n ");
		sql.append(" <ArcimDesc>桡动脉止血器(长春 蓝科恒业)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>150012</SubcatCode> \n ");
		sql.append(" <SubcatDesc>高值鞘</SubcatDesc> \n ");
		sql.append(" <UnitPrice>308</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>308</OrdFee> \n ");
		sql.append(" <RecDepDesc>DGS1-第一导管室</RecDepDesc> \n ");
		sql.append(" <ResDocName>刘佳</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||70</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>DGS1-第一导管室</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>162</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>介入用一次性医用材料费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400030001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>普通病房床位费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140003</SubcatCode> \n ");
		sql.append(" <SubcatDesc>床位费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>24</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>24</OrdFee> \n ");
		sql.append(" <Oeoridr>19816953||71</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>190</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>床位费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>100010001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>心内科护理常规</ArcimDesc> \n ");
		sql.append(" <SubcatCode>010001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>护理常规</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||72</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>100060004</ArcimCode> \n ");
		sql.append(" <ArcimDesc>二级护理</ArcimDesc> \n ");
		sql.append(" <SubcatCode>010006</SubcatCode> \n ");
		sql.append(" <SubcatDesc>护理级别</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||73</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>90</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>200010010</ArcimCode> \n ");
		sql.append(" <ArcimDesc>低盐低脂糖尿病饮食</ArcimDesc> \n ");
		sql.append(" <SubcatCode>020001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>饮食</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||74</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400010009</ArcimCode> \n ");
		sql.append(" <ArcimDesc>三级医院住院诊疗费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>诊疗费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||75</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>10</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>诊察(诊疗)费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400040001</ArcimCode> \n ");
		sql.append(" <ArcimDesc> 病房取暖费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140004</SubcatCode> \n ");
		sql.append(" <SubcatDesc>取暖费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>9</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||76</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212191</ArcimCode> \n ");
		sql.append(" <ArcimDesc>倍他乐克片(25mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.4</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||77</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302206025</ArcimCode> \n ");
		sql.append(" <ArcimDesc>拜唐苹片(50mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>2.38</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||78</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302211092</ArcimCode> \n ");
		sql.append(" <ArcimDesc>*泮立苏肠溶胶囊(40mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>5.9</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||79</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000020004</ArcimCode> \n ");
		sql.append(" <ArcimDesc>血小板聚集试验(ADP)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100002</SubcatCode> \n ");
		sql.append(" <SubcatDesc>血液</SubcatDesc> \n ");
		sql.append(" <UnitPrice>30</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>30</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKXYS-检验科血液室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||8</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212239</ArcimCode> \n ");
		sql.append(" <ArcimDesc>*美百乐镇片(40mg*7)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>9.98</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||80</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302202070</ArcimCode> \n ");
		sql.append(" <ArcimDesc>阿司匹林肠溶片(拜阿0.1g)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.5</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||81</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212124</ArcimCode> \n ");
		sql.append(" <ArcimDesc>波立维片(75mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>18.96</UnitPrice> \n ");
		sql.append(" <Quantity>0</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>KFYBYS-口服药摆药室</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||82</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400080001</ArcimCode> \n ");
		sql.append(" <ArcimDesc>患者今日出院。</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140008</SubcatCode> \n ");
		sql.append(" <SubcatDesc>出院</SubcatDesc> \n ");
		sql.append(" <UnitPrice>0</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>0</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||83</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302206025</ArcimCode> \n ");
		sql.append(" <ArcimDesc>拜唐苹片(50mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>2.38</UnitPrice> \n ");
		sql.append(" <Quantity>30</Quantity> \n ");
		sql.append(" <OrdFee>71.4</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||85</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212191</ArcimCode> \n ");
		sql.append(" <ArcimDesc>倍他乐克片(25mg)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.4</UnitPrice> \n ");
		sql.append(" <Quantity>20</Quantity> \n ");
		sql.append(" <OrdFee>8</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||86</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302212239</ArcimCode> \n ");
		sql.append(" <ArcimDesc>*美百乐镇片(40mg*7)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>9.98</UnitPrice> \n ");
		sql.append(" <Quantity>14</Quantity> \n ");
		sql.append(" <OrdFee>139.72</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||87</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400040001</ArcimCode> \n ");
		sql.append(" <ArcimDesc> 病房取暖费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140004</SubcatCode> \n ");
		sql.append(" <SubcatDesc>取暖费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>9</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>27</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||89</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>260</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>其它费用</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1000040172</ArcimCode> \n ");
		sql.append(" <ArcimDesc>全血细胞分析+ABO+Rh</ArcimDesc> \n ");
		sql.append(" <SubcatCode>100001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>临检</SubcatDesc> \n ");
		sql.append(" <UnitPrice>50</UnitPrice> \n ");
		sql.append(" <Quantity>1</Quantity> \n ");
		sql.append(" <OrdFee>50</OrdFee> \n ");
		sql.append(" <RecDepDesc>JYKMZ-检验科门诊</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||9</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-11-30</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>130</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>化验费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>100060004</ArcimCode> \n ");
		sql.append(" <ArcimDesc>二级护理</ArcimDesc> \n ");
		sql.append(" <SubcatCode>010006</SubcatCode> \n ");
		sql.append(" <SubcatDesc>护理级别</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>21</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||90</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>90</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>护理费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>1400010009</ArcimCode> \n ");
		sql.append(" <ArcimDesc>三级医院住院诊疗费</ArcimDesc> \n ");
		sql.append(" <SubcatCode>140001</SubcatCode> \n ");
		sql.append(" <SubcatDesc>诊疗费</SubcatDesc> \n ");
		sql.append(" <UnitPrice>7</UnitPrice> \n ");
		sql.append(" <Quantity>3</Quantity> \n ");
		sql.append(" <OrdFee>21</OrdFee> \n ");
		sql.append(" <RecDepDesc>XNK21-心内科21</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||91</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>10</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>诊察(诊疗)费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>308101136</ArcimCode> \n ");
		sql.append(" <ArcimDesc>*冠心舒通胶囊(0.3G*60片)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0308</SubcatCode> \n ");
		sql.append(" <SubcatDesc>中成药</SubcatDesc> \n ");
		sql.append(" <UnitPrice>62.1</UnitPrice> \n ");
		sql.append(" <Quantity>2</Quantity> \n ");
		sql.append(" <OrdFee>124.2</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYZYF-住院中药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||92</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>240</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>中成药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" <AdmDATA> \n ");
		sql.append(" <ArcimCode>302202070</ArcimCode> \n ");
		sql.append(" <ArcimDesc>阿司匹林肠溶片(拜阿0.1g)</ArcimDesc> \n ");
		sql.append(" <SubcatCode>0302</SubcatCode> \n ");
		sql.append(" <SubcatDesc>片剂</SubcatDesc> \n ");
		sql.append(" <UnitPrice>.5</UnitPrice> \n ");
		sql.append(" <Quantity>30</Quantity> \n ");
		sql.append(" <OrdFee>15</OrdFee> \n ");
		sql.append(" <RecDepDesc>ZYYF-住院药房</RecDepDesc> \n ");
		sql.append(" <ResDocName>迟云鹏</ResDocName> \n ");
		sql.append(" <Oeoridr>19816953||93</Oeoridr> \n ");
		sql.append(" <OrderDate>2015-12-01</OrderDate> \n ");
		sql.append(" <ResDepDesc>XNK21-心内科21</ResDepDesc> \n ");
		sql.append(" <MrCodeNew>231</MrCodeNew> \n ");
		sql.append(" <MrCodeNewDesc>西药费</MrCodeNewDesc> \n ");
		sql.append(" </AdmDATA> \n ");
		sql.append(" </AdmOrdInfoes> \n ");
		sql.append(" </Response> \n ");
		return sql.toString();
	}
	
	/**
	 * @title		:OrderFacadeImpl.java
	 * @description	:SAX解析xml辅助类
	 * @author		:lileizheng
	 * @date		:2016年1月14日
	 * @version     :1.0
	 * @copyright   :DHCC 2013-2014
	 */
	private class MyHandler extends DefaultHandler
	{
		// 使用栈这个数据结构来保存
	    private Stack<String> stack = new Stack<String>();

	    // 数据
	    private String admCode;
	    private String orderCode;//医嘱项Code
	    private String orderDesc;//医嘱项Desc
	    private String subcateCode;//医嘱子类Code
	    private String subcateDesc;//医嘱子类Desc,新增by wen
	    private Double orderTotalFee;//医嘱费用
	    private Double orderUnitPrice;//医嘱单价
	    private Integer orderQuantity;//医嘱数量
	    private String orderReceiveDep;//医嘱接受科室
	    private String orderDocDep;//接收科室
	    private String orderDoctor;//开单医生
	    private String orderFirstpageFee;//医嘱 病案首页费用分类编码
	    private String orderFirstpageFeeDesc;//医嘱 病案首页费用分类描述,新增by wen
	    
	    @Override
	    public void startDocument() throws SAXException
	    {
	        System.out.println("start document -> parse begin");
	    }

	    @Override
	    public void endDocument() throws SAXException
	    {

	        System.out.println("end document -> parse finished");
	    }

	    @Override
	    public void startElement(String uri, String localName, String qName,
	            Attributes attributes) throws SAXException
	    {
	        // 将标签名压入栈
	        stack.push(qName);

	        // 处理属性
//	        for (int i = 0; i < attributes.getLength(); ++i)
//	        {
//	            String attrName = attributes.getQName(i);
//	            String attrValue = attributes.getValue(i);
//
//	            System.out.println("属性： " + attrName + "=" + attrValue);
//
//	        }

	    }

	    @Override
	    public void characters(char[] ch, int start, int length)
	            throws SAXException
	    {
	        // 取出标签名
	        String tag = stack.peek();

	        if ("AdmDR".equals(tag))
	        {
	            admCode = new String(ch, start, length);
	        }
	        else if ("ArcimCode".equals(tag))
	        {
	            orderCode = new String(ch, start, length);
	        }
	        else if ("ArcimDesc".equals(tag))
	        {
	        	orderDesc = new String(ch, start, length);
	        }
	        else if ("SubcatCode".equals(tag))
	        {
	        	subcateCode = new String(ch, start, length);
	        }
	        else if ("SubcatDesc".equals(tag))
	        {
	        	subcateDesc = new String(ch, start, length);
	        }
	        else if ("UnitPrice".equals(tag))
	        {
	            orderUnitPrice = StringUtils.hasLength(new String(ch, start, length))?Double.parseDouble(new String(ch, start, length)):0;
	        }
	        else if ("Quantity".equals(tag))
	        {
	            orderQuantity = StringUtils.hasLength(new String(ch, start, length))?Integer.parseInt(new String(ch, start, length)):0;
	        }
	        else if ("OrdFee".equals(tag))
	        {
	            orderTotalFee = StringUtils.hasLength(new String(ch, start, length))?Double.parseDouble(new String(ch, start, length)):0;
	        }
	        else if ("RecDepDesc".equals(tag))
	        {
	        	orderReceiveDep = new String(ch, start, length);
	        }
	        else if ("ResDocName".equals(tag))
	        {
	            orderDoctor = new String(ch, start, length);
	        }
	        else if ("ResDepDesc".equals(tag))
	        {
	        	orderDocDep = new String(ch, start, length);
	        }
	        else if ("MrCodeNew".equals(tag))
	        {
	        	orderFirstpageFee = new String(ch, start, length);
	        }
	        else if ("MrCodeNewDesc".equals(tag))
	        {
	        	orderFirstpageFeeDesc = new String(ch, start, length);
	        }
	    }

	    @Override
	    public void endElement(String uri, String localName, String qName)
	            throws SAXException
	    {
	        stack.pop();// 表示该元素解析完毕，需要从栈中弹出标签

	        if ("AdmDATA".equals(qName)){
	            OrderDTO o = new OrderDTO();
	            o.setOrderMrId(admCode);
	            o.setOrderId(orderCode);
	            o.setOrderDesc(orderDesc);
	            o.setOrderTotalFee(orderTotalFee);
	            o.setOrderUnitPrice(orderUnitPrice);
	            o.setOrderQuantity(orderQuantity);
	            o.setOrderReceiveDep(orderReceiveDep);
	            o.setOrderDocDep(orderDocDep);
	            o.setOrderDoctor(orderDoctor);
	            o.setOrderFirstpageFee(orderFirstpageFee);
	            o.setOrderSubcate(subcateCode);
	            o.setOrderSubcateDesc(subcateDesc);
	            o.setOrderFirstpageFeeDesc(orderFirstpageFeeDesc);
	            orderList.add(OrderAssembler.toEntity(o));
	        }
	    }
	}
	
	private class TimeOutException extends Exception{
		public TimeOutException(String msg)  
	    {  
	        super(msg);  
	    } 
	}
}
